package com.ldk.admin.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import com.ldk.framework.entity.Appurl;
import com.ldk.framework.service.IAppurlService;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


@Controller
@RequestMapping("/webpage")
public class WebPageController extends BaseController {
	
	@Autowired
	private IAppurlService appurlService;
	
	/**
	 * 获取链接详情
	 * @paramparms
	 * @return
	 */
	@RequestMapping("/info/{msgId}")
	public ModelAndView helpInfo(@PathVariable(value="msgId") long msgId, ModelMap map,HttpServletRequest request,
								 HttpServletResponse response){
		//session是否过期
		map.addAttribute("title", "详情");
		Appurl query=new Appurl();
		query.setId(msgId);
		Appurl model = appurlService.selectByKey("", query);
		
		return new ModelAndView("/webpage/msginfo","model", model);
	}
}

